home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / gfxprograms / egs / egs-sorcery-install / install_egs-sorcery < prev    next >
Encoding:
Text File  |  1995-02-13  |  10.5 KB  |  444 lines

  1. ; $VER: Installation script for EGS-Sorcery V1.0 (06-18-94)
  2. ;
  3. ; written by Brian C. Wright
  4. ;
  5. ;    Installer and Installer project icon
  6. ;    (c) Copyright 1991-93 Commodore-Amiga, Inc.  All Rights Reserved.
  7. ;    Reproduced and distributed under license from Commodore.
  8. ;
  9. ;    INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
  10. ;    NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
  11. ;    OR RESPONSIBILITY IS ASSUMED. 
  12. ;
  13. ;
  14.  
  15. (welcome "EGS-Sorcery Version 1.0 Installation")
  16.  
  17. (message "\n\nWelcome to the EGS-Sorcery V1.0 icon system for the EGS-Dock. "
  18.          "This system contains over 1 meg of icon files which can be mixed "
  19.          "and matched to your own preference.  Example EGSDock.config files "
  20.          "will be provided.  At the end of the installation, you may choose "
  21.          "which config file you wish to begin using."
  22.          
  23.  
  24. (set integrated     0)
  25. (set non-integrated 0)
  26. (set prefs          0)
  27. (set apps           0)
  28.  
  29. (set installed     0)
  30. (set which-icons   0)
  31. (set int-size    323)
  32. (set nint-size   164)
  33. (set prefs-size  497)
  34. (set apps-size     8)
  35.  
  36. (set configdest "EGS:s/EGSDock.config")
  37.  
  38. (set configf1 "Integrated (A) Blue Prefs")    ; %0000000001
  39. (set configf2 "Integrated (A) No Prefs")    ; %0000000010
  40. (set configf3 "Integrated (A) icons only")    ; %0000000100
  41. (set configf4 "Integrated (A) Rainbow Prefs")    ; %0000001000
  42. (set configf5 "Integrated (S) Rainbow Prefs")    ; %0000010000
  43. (set configf6 "Integrated (S) with Apps")    ; %0000100000
  44. (set configf7 "Non-Integrated with Apps")    ; %0001000000
  45. (set configf8 "Non-Integrated icons only")    ; %0010000000
  46. (set configf9 "Non-Integrated Orange Prefs")    ; %0100000000
  47. (set configf10 "Text only")            ; %1000000000
  48.  
  49. (set config1 "s/IntegratedABluePrefs")
  50. (set config2 "s/IntegratedANoPrefs")
  51. (set config3 "s/IntegratedANoPrefsNoApps")
  52. (set config4 "s/IntegratedARainbowPrefs")
  53. (set config5 "s/IntegratedSRainbowPrefs")
  54. (set config6 "s/IntegratedSAppsNoPrefs")
  55. (set config7 "s/NonIntegratedAppsNoPrefs")
  56. (set config8 "s/NonIntegratedNoPrefsNoApps")
  57. (set config9 "s/NonIntegratedOrangePrefs")
  58. (set config10 "s/TextOnly")
  59.  
  60. (procedure copyconfig
  61.   (
  62.     (set configsource (tackon egs-dest configsource))
  63.     (copyfiles
  64.          (help @copyfiles-help)
  65.          (source configsource)
  66.          (dest "EGS:s")
  67.          (newname configdest)
  68.     )
  69.   )
  70. )
  71.  
  72. (procedure copyicons
  73.     (
  74.          (set temp (tackon egs-dest dirname))
  75.          (makedir temp)
  76.          (copyfiles
  77.               (prompt ("Installing %s Icons..." dirname))
  78.               (help @copyfiles-help)
  79.               (source dirname)
  80.               (dest temp)
  81.               (all)
  82.          )
  83.     )
  84. )
  85.  
  86. (procedure copypref
  87.     (copyfiles
  88.            (help @copyfiles-help)
  89.            (source configfile)
  90.            (dest temp)
  91.     ) 
  92. )
  93.  
  94. (procedure copyinformational
  95.     (working "Installing informational files...")
  96.     (complete 16)
  97.     (copyfiles
  98.            (help @copyfiles-help)
  99.            (source ".dirinfo")
  100.            (dest destination)
  101.            (newname "EGS-Sorcery.info")
  102.            (nogauge)
  103.     )
  104.     (complete 17)
  105.     (copyfiles
  106.            (help @copyfiles-help)
  107.            (source ".catinfo")
  108.            (dest egs-dest)
  109.            (newname "Catalog.readme.info")
  110.            (nogauge)
  111.     )
  112.     (complete 18)
  113.     (copyfiles
  114.            (help @copyfiles-help)
  115.            (source ".copyrightinfo")
  116.            (dest egs-dest)
  117.            (newname "Copyright.readme.info")
  118.            (nogauge)
  119.     )
  120.     (complete 19)
  121.     (copyfiles
  122.            (help @copyfiles-help)
  123.            (source ".sorcereadinfo")
  124.            (dest egs-dest)
  125.            (newname "EGS-Sorcery.readme.info")
  126.            (nogauge)
  127.     )
  128.     (complete 20)
  129.     (copyfiles 
  130.            (help @copyfiles-help)
  131.            (source ".instconfiginfo")
  132.            (dest egs-dest)
  133.            (newname "Install_SorceryConfig.info")
  134.            (nogauge)
  135.     )
  136.     (complete 21)
  137.     (copyfiles
  138.            (help @copyfiles-help)
  139.            (source "Install_SorceryConfig")
  140.            (dest egs-dest)
  141.            (nogauge)
  142.     )
  143.     (complete 22)
  144.     (copyfiles
  145.            (help @copyfiles-help)
  146.            (source "Installer")
  147.            (dest egs-dest)
  148.            (nogauge)
  149.     )
  150.     (complete 23)
  151.     (copyfiles
  152.            (help @copyfiles-help)
  153.            (source "Sorcery.large")
  154.            (dest egs-dest)
  155.            (nogauge)
  156.     )
  157.     (complete 24)
  158.     (copyfiles
  159.            (help @copyfiles-help)
  160.            (source "Sorcery")
  161.            (dest egs-dest)
  162.            (nogauge)
  163.     )
  164.     (complete 25)                      
  165.     (copyfiles
  166.            (help @copyfiles-help)
  167.            (source "")
  168.            (dest egs-dest)
  169.            (pattern "#?.readme")
  170.            (files)
  171.            (nogauge)
  172.     )
  173.  
  174.     (set temp (tackon egs-dest "s"))
  175.     (makedir temp)
  176.     (working "Setting up config files...")
  177.     (complete 30)
  178.     (copyfiles
  179.            (help @copyfiles-help)
  180.            (source "s")
  181.            (dest temp)
  182.            (all)
  183.            (nogauge)
  184.     )
  185. )
  186.  
  187. ; search for the EGS Assign.  If unavailable, quit.
  188.  
  189. (set egs-assign
  190.         (getassign "EGS")
  191. )
  192.  
  193. (if (= egs-assign "")
  194.         (
  195.              (abort "\n\nNo EGS: assign available.\n\n" 
  196.                     "Please assign EGS and restart the installation.")
  197.         )
  198. )
  199.  
  200. ; Set the destination and append EGS-Sorcery to it.
  201.  
  202. (set in-egs
  203.         (askbool
  204.                (prompt "\n\nInstall EGS-Sorcery into the EGS: directory? "
  205.                        "\n\nNote: This is the location where the included config "
  206.                        "files expect it to be.  If you select 'No' here, you will "
  207.                        "need to write your own config files for where ever you select "
  208.                        "to have it installed."
  209.                )
  210.                (help @askbool-help)
  211.                (choices "Yes" "No")
  212.         )
  213. )
  214.  
  215. (if (= in-egs 1)
  216.         (set destination "EGS:")
  217.         (set destination
  218.                (askdir 
  219.                        (prompt "Into which directory would you like EGS-Sorcery installed? "
  220.                                "\n(An 'EGS-Sorcery' subdirectory will be created.)" )
  221.                        (help @askdir-help)
  222.                        (default "EGS:")
  223.                )
  224.         )
  225. )
  226.  
  227. (set egs-dest (tackon destination "EGS-Sorcery"))
  228. (set @default-dest egs-dest)
  229. (makedir egs-dest)
  230.  
  231. (complete 10)
  232.  
  233. (set install-all
  234.         (askbool
  235.                (prompt "\n\n\nWould you like to install everything?")
  236.                (help @askbool-help)
  237.                (choices "Yes" "No")
  238.         )
  239. )
  240.  
  241. (if (= install-all 0)
  242.         (set which-icons
  243.                (askoptions
  244.                       (prompt "Which set(s) of icons would you like to install?")
  245.                       (help @askoptions-help)
  246.                       (choices ("Integrated     (%ldK)" int-size)
  247.                                ("Non-Integrated (%ldK)" nint-size) 
  248.                                ("Prefs          (%ldK)" prefs-size) 
  249.                                ("Apps           (%ldK)" apps-size)
  250.                       )
  251.                )
  252.         )
  253.     
  254.         (if (= which-icons 0)
  255.             (
  256.                (complete 15)
  257.                (copyinformational)
  258.  
  259.                (complete 35)
  260.                (set integrated 1)
  261.                (set dirname "Integrated")
  262.                (copyicons)
  263.  
  264.                (complete 45)
  265.                (set non-integrated 1)
  266.                (set dirname "Non-Integrated")
  267.                (copyicons)
  268.  
  269.                (complete 65)
  270.                (set prefs 1)
  271.                (set dirname "Prefs")
  272.                (copyicons)
  273.  
  274.                (complete 85)
  275.                (set apps 1)
  276.                (set dirname "Apps")
  277.                (copyicons)
  278.  
  279.                (set installed 1)
  280.             ) 
  281.         )
  282.  
  283. )
  284.  
  285. (if (= installed 0)
  286.    (
  287.      (set button1 (BITAND which-icons %0001))
  288.      (set button2 (BITAND which-icons %0010))
  289.      (set button3 (BITAND which-icons %0100))
  290.      (set button4 (BITAND which-icons %1000))
  291.      
  292.      (complete 15)
  293.  
  294.      (copyinformational)
  295.  
  296.      (if (> button1 0)
  297.          (
  298.              (set integrated 1)
  299.              (set dirname "Integrated")
  300.          (complete 35)
  301.              (copyicons)
  302.          )
  303.          (complete 35)
  304.      )
  305.  
  306.      (if (> button2 0)
  307.         (
  308.              (set non-integrated 1)
  309.              (set dirname "Non-Integrated")
  310.              (complete 50)
  311.              (copyicons)
  312.          )
  313.          (complete 50)
  314.      )
  315.  
  316.      (if (> button3 0)
  317.          (
  318.              (set prefs 1)
  319.              (set dirname "Prefs")
  320.              (complete 65)
  321.              (copyicons)
  322.          )
  323.          (complete 65)
  324.          
  325.      )
  326.  
  327.      (if (> button4 0)
  328.          (
  329.              (set apps 1)
  330.              (set dirname "Apps")
  331.              (complete 85)
  332.              (copyicons)
  333.          )
  334.          (complete 85)
  335.      )
  336.   )
  337. )    
  338.  
  339. (set which-file 
  340.     (askbool
  341.         (prompt "\n\nWould you like a working configuration file installed? \n\n"
  342.                 "Note: This action will rename your old EGSDock.config file "
  343.                 "and replace have just installed.  You need to be aware which icon "
  344.                 "sets you have installed to install the proper configuration file."
  345.         )
  346.         (help @askbool-help)
  347.         (choices "Yes" "No")
  348.     )
  349. )
  350.  
  351. (if (= which-file 1)
  352.         (set which-conf-file
  353.                 (askchoice
  354.                        (prompt "Which configuration file would you like installed?")
  355.                        (help @askchoice-help)
  356.                        (choices configf1 configf2 configf3 configf4 configf5
  357.                                 configf6 configf7 configf8 configf9 configf10
  358.                        )
  359.                        (default 0)
  360.                 )
  361.         )
  362.         (exit "Thank you for choosing EGS-Sorcery!")
  363. )
  364.  
  365.  
  366. (if (> (exists configdest (noreq)) 0)
  367.         (rename "EGS:s/EGSDock.config" "EGS:s/EGSDock.config.bak")
  368. )
  369.  
  370.  
  371. (if (= which-conf-file 0)
  372.     (
  373.     (set configsource config1)
  374.         (copyconfig)
  375.     )
  376. )
  377.  
  378. (if (= which-conf-file 1)
  379.     (
  380.     (set configsource config2)
  381.         (copyconfig)
  382.     )
  383. )
  384.  
  385. (if (= which-conf-file 2)
  386.     (
  387.     (set configsource config3)
  388.         (copyconfig)
  389.     )
  390. )
  391.  
  392. (if (= which-conf-file 3)
  393.     (
  394.     (set configsource config4)
  395.         (copyconfig)
  396.     )
  397. )
  398.  
  399. (if (= which-conf-file 4)
  400.     (
  401.     (set configsource config5)
  402.         (copyconfig)
  403.     )
  404. )
  405.  
  406. (if (= which-conf-file 5)
  407.     (
  408.     (set configsource config6)
  409.         (copyconfig)
  410.     )
  411. )
  412.  
  413. (if (= which-conf-file 6)
  414.     (
  415.     (set configsource config7)
  416.         (copyconfig)
  417.     )
  418. )
  419. (if (= which-conf-file 7)
  420.     (
  421.     (set configsource config8)
  422.         (copyconfig)
  423.     )
  424. )
  425.  
  426. (if (= which-conf-file 8)
  427.     (
  428.     (set configsource config9)
  429.         (copyconfig)
  430.     )
  431. )
  432.  
  433. (if (= which-conf-file 9)
  434.     (
  435.     (set configsource config10)
  436.         (copyconfig)
  437.     )
  438. )
  439.  
  440. (complete 100)
  441.